Integrand size = 33, antiderivative size = 124 \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=\frac {3 i \text {arctanh}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{4 \sqrt {2} a \sqrt {c} f}-\frac {3 i}{4 a f \sqrt {c-i c \tan (e+f x)}}+\frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \]
[Out]
Time = 0.21 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3603, 3568, 44, 53, 65, 212} \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=\frac {3 i \text {arctanh}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{4 \sqrt {2} a \sqrt {c} f}-\frac {3 i}{4 a f \sqrt {c-i c \tan (e+f x)}}+\frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \]
[In]
[Out]
Rule 44
Rule 53
Rule 65
Rule 212
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \frac {\int \cos ^2(e+f x) \sqrt {c-i c \tan (e+f x)} \, dx}{a c} \\ & = \frac {\left (i c^2\right ) \text {Subst}\left (\int \frac {1}{(c-x)^2 (c+x)^{3/2}} \, dx,x,-i c \tan (e+f x)\right )}{a f} \\ & = \frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}}+\frac {(3 i c) \text {Subst}\left (\int \frac {1}{(c-x) (c+x)^{3/2}} \, dx,x,-i c \tan (e+f x)\right )}{4 a f} \\ & = -\frac {3 i}{4 a f \sqrt {c-i c \tan (e+f x)}}+\frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}}+\frac {(3 i) \text {Subst}\left (\int \frac {1}{(c-x) \sqrt {c+x}} \, dx,x,-i c \tan (e+f x)\right )}{8 a f} \\ & = -\frac {3 i}{4 a f \sqrt {c-i c \tan (e+f x)}}+\frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}}+\frac {(3 i) \text {Subst}\left (\int \frac {1}{2 c-x^2} \, dx,x,\sqrt {c-i c \tan (e+f x)}\right )}{4 a f} \\ & = \frac {3 i \text {arctanh}\left (\frac {\sqrt {c-i c \tan (e+f x)}}{\sqrt {2} \sqrt {c}}\right )}{4 \sqrt {2} a \sqrt {c} f}-\frac {3 i}{4 a f \sqrt {c-i c \tan (e+f x)}}+\frac {i}{2 a f (1+i \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \\ \end{align*}
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.65 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.43 \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=-\frac {i \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},2,\frac {1}{2},-\frac {1}{2} i (i+\tan (e+f x))\right )}{2 a f \sqrt {c-i c \tan (e+f x)}} \]
[In]
[Out]
Time = 0.62 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.82
method | result | size |
derivativedivides | \(\frac {2 i c^{2} \left (\frac {\frac {\sqrt {c -i c \tan \left (f x +e \right )}}{2 c +2 i c \tan \left (f x +e \right )}+\frac {3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{4 c^{2}}-\frac {1}{4 c^{2} \sqrt {c -i c \tan \left (f x +e \right )}}\right )}{f a}\) | \(102\) |
default | \(\frac {2 i c^{2} \left (\frac {\frac {\sqrt {c -i c \tan \left (f x +e \right )}}{2 c +2 i c \tan \left (f x +e \right )}+\frac {3 \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c -i c \tan \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{4 \sqrt {c}}}{4 c^{2}}-\frac {1}{4 c^{2} \sqrt {c -i c \tan \left (f x +e \right )}}\right )}{f a}\) | \(102\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (91) = 182\).
Time = 0.26 (sec) , antiderivative size = 272, normalized size of antiderivative = 2.19 \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=\frac {{\left (-3 i \, \sqrt {\frac {1}{2}} a c f \sqrt {\frac {1}{a^{2} c f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-\frac {3 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, a f\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {1}{a^{2} c f^{2}}} - i\right )} e^{\left (-i \, f x - i \, e\right )}}{2 \, a f}\right ) + 3 i \, \sqrt {\frac {1}{2}} a c f \sqrt {\frac {1}{a^{2} c f^{2}}} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (-\frac {3 \, {\left (\sqrt {2} \sqrt {\frac {1}{2}} {\left (-i \, a f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a f\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {1}{a^{2} c f^{2}}} - i\right )} e^{\left (-i \, f x - i \, e\right )}}{2 \, a f}\right ) + \sqrt {2} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} {\left (-2 i \, e^{\left (4 i \, f x + 4 i \, e\right )} - i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{8 \, a c f} \]
[In]
[Out]
\[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=- \frac {i \int \frac {1}{\sqrt {- i c \tan {\left (e + f x \right )} + c} \tan {\left (e + f x \right )} - i \sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx}{a} \]
[In]
[Out]
none
Time = 0.31 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.02 \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=-\frac {i \, {\left (\frac {3 \, \sqrt {2} \sqrt {c} \log \left (-\frac {\sqrt {2} \sqrt {c} - \sqrt {-i \, c \tan \left (f x + e\right ) + c}}{\sqrt {2} \sqrt {c} + \sqrt {-i \, c \tan \left (f x + e\right ) + c}}\right )}{a} + \frac {4 \, {\left (3 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )} c - 4 \, c^{2}\right )}}{{\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} a - 2 \, \sqrt {-i \, c \tan \left (f x + e\right ) + c} a c}\right )}}{16 \, c f} \]
[In]
[Out]
\[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=\int { \frac {1}{{\left (i \, a \tan \left (f x + e\right ) + a\right )} \sqrt {-i \, c \tan \left (f x + e\right ) + c}} \,d x } \]
[In]
[Out]
Time = 6.05 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.91 \[ \int \frac {1}{(a+i a \tan (e+f x)) \sqrt {c-i c \tan (e+f x)}} \, dx=-\frac {\frac {c\,1{}\mathrm {i}}{a\,f}-\frac {\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )\,3{}\mathrm {i}}{4\,a\,f}}{2\,c\,\sqrt {c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}-{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{3/2}}-\frac {\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-c}}\right )\,3{}\mathrm {i}}{8\,a\,\sqrt {-c}\,f} \]
[In]
[Out]